package cn.com.review;
//多态
public class TestAbs {
    public static void main(String[] args) {
                Dog d = new WW();
                d.eat();
                d.play();
    }
}
abstract  class Dog{
    public void eat(){
        System.out.println("狗爱吃骨头");
    }
    public abstract void play();
}

class WW extends Dog{

    @Override//重写抽象父类的所有抽象方法
    public void play() {
        System.out.println("子类重写的玩法");
    }
}